package com.itgungnir.designpattern.strategy;

/**
 * 鸭子超类
 */
public class Duck {
	protected FlyBehavior flyBehavior;
	protected QuackBehaviro quackBehaviro;

	public void performFly() {
		flyBehavior.fly();
	}

	public void performQuack() {
		quackBehaviro.quack();
	}

	public void setFlyBehavior(FlyBehavior flyBehavior) {
		this.flyBehavior = flyBehavior;
	}

	public void setQuackBehaviro(QuackBehaviro quackBehaviro) {
		this.quackBehaviro = quackBehaviro;
	}
}